from common.base import Base, By


class HomePage(Base):
    # 封装表现层
    search_text_loc = (By.NAME, 'word') # 商品搜索输入框
    search_button_loc = (By.CSS_SELECTOR, '[value="商品搜索"]') # 商品搜索按钮


    # 封装操作层
    def input_search_text(self,text):
        self.send_keys(HomePage.search_text_loc,text)

    # 点击商品搜索按钮
    def click_search_button(self):
        self.click(HomePage.search_button_loc)
